<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<script type="text/javascript">
	$(function() {
		validReg("addForm");
	});
</script>
<div class="page-content">
	<!--content-->
	<div class="containerTop">
		<a href="javascript:;" class="a-back"
			onclick="menuUrl('role/view', 'role:page');"><span
			class="icon-back"></span></a> <span>添加角色</span>
	</div>



	<div class="panel charger">
		<form id="addForm" class="form-horizontal" role="form"
			onsubmit="return false;">
			<div class="numbResult">基本信息</div>

			<div class="form-group">
				<label class="col-sm-2 control-label"><span class="col_red">*</span>角色名称：</label>
				<div class="col-sm-10 ">
					<div class="pr">
						<input type="text" name="name" id="name"  class="form-control"
							placeholder="请输入角色名称" required data-bv-notempty data-bv-stringlength-max="100"  data-bv-stringlength="true">
					</div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">描述：</label>
				<div class="col-sm-10">
					<!--<input type="text" class="form-control" placeholder="请输入办公电话">-->
					<textarea class="form-control" name="note" rows="6" data-bv-stringlength-max="500"  data-bv-stringlength="true"></textarea>
				</div>
			</div>

			<div class="numbResult">权限列表</div>

            <div class="treelayout" id="authList">
				<ul>
				
				
					<c:forEach items="${result.data}" var ="row" varStatus="status">
						
						
								<li>
								<h4><label><input type="checkbox"  class="syscheckBox" name="rootMenuList"  value="${row.id }" />${row.name }</label></h4>
								<ul>
									<c:forEach items="${row.childList}" var ="subrow" varStatus="status">
											<li>
												<h4><label><input type="checkbox" class="syscheckBox" name="menuList" value="${subrow.id }-${row.id }" />${subrow.name }</label></h4>
											</li>
									</c:forEach>
								</ul>
							</li>
						
					</c:forEach>
				
				</ul>
			</div>

			<div class="text-center opareBtm">

				<button class="a-btn1" onclick="validateCallback(this, role.addrole);">确定</button>
				<button type="button" onclick="menuUrl('role/view', 'role:page');"
					class="a-btn1 grey">返回</button>

			</div>
		</form>



	</div>


	<!--end content-->
	<div class="clearfix"></div>
</div>
<script src="resources/js/page/authList.js"></script>